<template>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="oid" label="序号" width="180" />
      <el-table-column prop="ordernumber" label="编号" width="180" />
      <el-table-column prop="uid" label="账号id" width="180" />
      <el-table-column prop="total" label="总价格" width="180" />
      <el-table-column prop="createtime" label="创建时间" width="180" />
      <el-table-column prop="updatetime" label="修改时间" width="180" />
      <el-table-column prop="state" label="修改时间" width="180" #default="scope" >
        <el-button type="success" v-if="scope.row.state==0" @click="xiafam()">下单</el-button>
        <el-button type="warning" v-if="scope.row.state==1">未发货</el-button>
        <el-button type="danger" v-if="scope.row.state==2">已发货</el-button>
      </el-table-column>
    </el-table>
  </template>
  
  <script  setup>
  import { alluyt } from '@/api/gouwu';
  import { ref } from 'vue';
  const tableData=ref([])
  function all(){
    alluyt().then(res=>{
        if(res.data.code==200){
            tableData.value=res.data.data.data
            console.log(res);
            
        }
    })
  }
  all()
  // 下单
  function xiafam(){
    
  }
  </script>
  